package org.gpslw.controller;


import org.gpslw.entity.NycNeighborhoods;
import org.gpslw.service.NycNeighborHoodsService;
import org.gpslw.util.SimpleFeatureUtils;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Polygon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/geotools")
public class GeotoolsController {

    @Autowired
    private NycNeighborHoodsService  nycNeighborHoodsService;

    @RequestMapping("/list")
    public List<NycNeighborhoods> list() {
        return nycNeighborHoodsService.findAll();
    }

    @RequestMapping("/save")
    public String save() {
        nycNeighborHoodsService.save();
        return "success";
    }

}
